package com.zzyl.common.core.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Description PageResult
 * @Author cangyue
 * @Date 2025-07-22
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PageResult<T> {
    private Integer code;
    private Long total;
    private String msg;
    private List<T> rows;
    public static <T> PageResult<T> success(Long total, String msg, List<T> list){
        return new PageResult<>(200,total, msg, list);
    }
    public static <T> PageResult<T> success(Long total, List<T> list){
        return new PageResult<>(200,total, "success", list);
    }
}
